{php include wl_template('common/header');}
<ul class="nav nav-tabs">
	<li><a href="{php echo web_url('area/custom/index')}">自定义地区</a></li>
	{if !empty($_GPC['id'])}
	<li class="active"><a href="#">编辑地区</a></li>
	{else}
	<li {if empty($_GPC['id'])}class="active"{/if}><a href="{php echo web_url('area/custom/edit')}">添加地区</a></li>
	{/if}
</ul>
<div class="app-content">
	<div class="app-form">
		<form action="" method="post" class="form-horizontal form form-validate" id="form1">
			<div class="panel panel-default" id="step1">
				<div class="panel-heading">
					地区管理
				</div>
				<div class="panel-body">
				{if !empty($_GPC[parentid])}
					<div class="form-group">
			    		<label class="col-sm-2 control-label">上级地区</label>
			    		<div class="col-sm-9">
			      			<input type="text" name="pidname" readonly="true" class="form-control" value="{$pidname}" autocomplete="off">
			    		</div>
			  		</div>
				{/if}
					<div class="form-group">
			    		<label class="col-sm-2 control-label">地区名称<span class="must-fill">*</span></label>
			    		<div class="col-sm-9">
			      			<input type="text" name="name" required class="form-control" value="{$category['name']}" autocomplete="off">
			    		</div>
			  		</div>
			  		<div class="form-group">
			    		<label class="col-sm-2 control-label">是否开启</label>
			    		<div class="col-sm-9">
			    			<label class="radio-inline">
			      				<input type="radio" name='visible' value='2' {if $category['visible']==2 || empty($category['visible'])}checked{/if}>开启
			      			</label>
			      			<label class="radio-inline">
	      						<input type="radio" name='visible' value='1' {if $category['visible']==1}checked{/if}>关闭
			      			</label>
			    		</div>
			  		</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-2 control-label"></label>
				<div class="col-sm-9">
					<input type="submit" name="submit" lay-submit value="提交" class="btn btn-primary min-width" />
					<input type="hidden" name="token" value="{$_W['token']}" />
					<input type="hidden" name="parentid" value="{$_GPC[parentid]}" />
                    <input type="hidden" name="id" value="{$_GPC[id]}" />
				</div>
			</div>
		</form>
	</div>
</div>
{php include wl_template('common/footer');}